﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.Core.Model;
using System.Runtime.Serialization;

namespace EzDesk.Apps.Model.Attendance
{
    /// <summary>
    /// 描述一个假期
    /// </summary>
    [DataContract]
    public class LeaveInfo:IModel
    {
        public LeaveInfo()
        {
            IsAudited = false;
            AuditTime = DateTime.Now;
        }

        [DataMember]
        public Guid Id { get; set; }
        [DataMember]
        public Guid LeaveTypeId { get; set; }
        [DataMember]
        public string LeaveTypeName { get; set; }
        [DataMember]
        public Guid UserId { get; set; }
        [DataMember]
        public DateTime StartTime { get; set; }
        [DataMember]
        public DateTime EndTime { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public bool IsAudited { get; set; }
        [DataMember]
        public Guid AuditUserId { get; set; }
        [DataMember]
        public string AuditNote { get; set; }
        [DataMember]
        public DateTime AuditTime { get; set; }
        [DataMember]
        public bool IsForWork { get; set; }
        [DataMember]
        public bool IsAgreed { get; set; }

        [DataMember]
        public DateTime CreateTime { get; set; }

        [DataMember]
        public SimpleUser User { get; set; }
    }
}
